import { cloneDeep } from 'lodash-es'
import medicineColumns from './columns/medicine'
import disposeColumns from './columns/disposeColumns'
import militaryColumns from './columns/militaryColumns'
import TCMmedicineColumns from './columns/TCMmedicine'
import diagnosisColumns from './columns/diagnosis'
import diagnosisColumnsList from './columns/diagnosisList'
import articleColumns from './columns/article'
import barCodeColumns from './columns/barCodeColumns'
import inspectionItemsColumns from './columns/inspectionItemsColumns'
import registrationFees from './columns/registrationFees'
import registeredPatientsList from './columns/registeredPatientsList'
import registeredPatientsListRefund from './columns/registeredPatientsListRefund'
import registeredPatientsRefund from './columns/registeredPatientsRefund'
import reservationColumns from './columns/reservation'
import movementDetails from './columns/movementDetails'
import supplyDetails from './columns/supplyDetails'
import serve from './columns/serve'
import physiotherapyBooking from './columns/physiotherapyBooking'
import appointmentDoctor from './columns/appointmentDoctor'
import appointmentUser from './columns/appointmentUser'
import empcolumns from './columns/empcolumns'
import shiftscolumns from './columns/shiftscolumns'
import roomcolumns from './columns/roomcolumns'
import inRegistration from './columns/inRegistration'
import chargeCollect from './columns/chargeCollect'
import inSettlement from './columns/inSettlement'
import optometryComFrame from './columns/optometryComFrame'
import optometryComLens from './columns/optometryComLens'
import optometryComOther from './columns/optometryComOther'
import inDischargeRefund from './columns/inDischargeRefund'
import evacuationPlan from './columns/evacuationPlan'

const config = {
  咨询师今日接待人数: {
    desc: '选择员工',
    columns: [
      { dataIndex: 'empName', ellipsis: 'true', title: '姓名' },
      { dataIndex: 'sex', width: 50, title: '性别' },
      { dataIndex: 'age', width: 50, title: '年龄' },
      { dataIndex: 'phone', width: 100, title: '手机号' },
      { dataIndex: 'ksmc', title: '科室', ellipsis: 'true' },
      { dataIndex: 'empId', title: '员工编号', ellipsis: 'true' },
      { dataIndex: 'jrjdrs', title: '今日接待人数' }
    ],
    url: '/operation/opex/getConsultantsInfoList',
    rowKey: 'id',
    searchKey: 'mcbm',
    params: {
      yxzt: 0,
      pageNum: 1,
      pageSize: 10
    }
  },
  医保病种: {
    desc: '选择医保病种',
    columns: [
      // { title: '序号', dataIndex: 'outorder' },
      { title: '病种名称', dataIndex: 'diseTypeName', ellipsis: true },
      { title: '病种目录代码', dataIndex: 'diseTypeCode', ellipsis: true },
      { title: '治疗方式名称', dataIndex: 'treatmentName', ellipsis: true },
      { title: '治疗方式代码', dataIndex: 'treatmentCode', ellipsis: true }
    ],
    url: '/insure/getNmiDictDiseTypeList',
    rowKey: 'id',
    searchKey: 'zjm',
    params: {
      pageNum: 1,
      pageSize: 10
    }
  },
  检验条码: {
    desc: '选择人员',
    columns: [
      { title: '类别', dataIndex: 'applyPath', width: 100, ellipsis: true },
      { title: '科室/床位', dataIndex: 'applyDeptName', ellipsis: true },
      { title: '姓名', dataIndex: 'brName', ellipsis: true },
      { title: '大类', dataIndex: 'categroyName', ellipsis: true },
      { title: '条码', dataIndex: 'barCode', ellipsis: true },
      {
        title: '使用状态',
        dataIndex: 'recordCode',
        ellipsis: true,
        customRender: (record) => {
          if (record?.record?.lisRecordEntity?.recordCode) {
            return '已使用'
          } else {
            return '未使用'
          }
        }
      }
    ],
    url: '/lis/LisApply/getLisApplyList',
    rowKey: 'lsh',
    searchKey: 'pyjm',
    params: {
      printStatus: 1,
      pageNum: 1,
      pageSize: 10
    }
  },
  住院入区护士: {
    desc: '选择住院入区护士',
    columns: [
      { title: '编号', dataIndex: 'empId' },
      { title: '名称', dataIndex: 'empName' },
      { title: '备注', dataIndex: 'memo' }
    ],
    url: '/operation/opex/wardPersonnelList',
    rowKey: 'empId',
    labelKey: 'empName',
    searchKey: 'pyjm',
    params: {
      pyjm: '',
      pageNum: 1,
      pageSize: 10
    }
  },
  病案手术: {
    desc: '选择病案手术',
    columns: [
      { title: '手术操作代码', dataIndex: 'icd9Code', width: 100, ellipsis: true },
      { title: '手术操作名称', dataIndex: 'icd9Name', ellipsis: true }
    ],
    url: '/common/masterData/getDictICD9List',
    rowKey: 'bh',
    searchKey: 'zjm',
    params: {
      zjm: '',
      status: '',
      pageNum: 1,
      pageSize: 10
    }
  },
  防疫防护医生: {
    desc: '选择医生',
    columns: [
      { title: '姓名', dataIndex: 'empName' },
      { title: '性别', dataIndex: 'sex', width: 50 },
      { title: '年龄', dataIndex: 'age', width: 50 },
      { title: '职业', dataIndex: 'title' },
      { title: '拼音简码', dataIndex: 'zjm' },
      { title: '员工编号', dataIndex: 'empId' }
    ],
    url: '/outp/mzdj/getDocterInfoList',
    rowKey: 'empId',
    labelKey: 'empName',
    searchKey: 'zjm',
    params: {
      emplb: '1',
      ksdm: ''
    }
  },
  西成药字典: {
    desc: '选择西成药字典',
    columns: [
      { dataIndex: 'mc', title: '药材名称', width: 120 },
      { dataIndex: 'dw', title: '单位', width: 60 },
      { dataIndex: 'dj', title: '单价', width: 60 }
    ],
    url: '/operation/opex/getDrugInfoList',
    rowKey: 'bh',
    searchKey: 'zjm',
    params: {
      xmlb: [],
      ylfl: []
    }
  },
  装备配置: {
    desc: '选择装备配置',
    columns: [
      { dataIndex: 'equipmentNumber', title: '设备序列号', width: 100 },
      { dataIndex: 'equipmentName', title: '装备名称', width: 100 },
      { dataIndex: 'gg', title: '规格', width: 100 },
      { dataIndex: 'model', title: '型号', width: 100 },
      { dataIndex: 'brand', title: '品牌', width: 100 },
      { dataIndex: 'sl', title: '数量', width: 100 },
      { dataIndex: 'supplierName', title: '单位', width: 100 }
    ],
    url: '/war/equipmentDistribution/getEquipmentConfigDictList',
    rowKey: 'bh',
    searchKey: 'zjm',
    params: {}
  },
  物资申领: {
    desc: '选择药品',
    columns: [
      { dataIndex: 'mc', title: '项目', ellipsis: true, width: 240 },
      // { dataIndex: 'yxq', title: '有效期' },
      { dataIndex: 'sl', title: '库存量', align: 'right' },
      { dataIndex: 'dw', title: '单位' }
    ],
    url: '/common/masterData/selectWZYPZKC',
    rowKey: 'bh',
    searchKey: 'zjm',
    params: {}
  },
  药品申领: {
    desc: '选择药品',
    columns: [
      { dataIndex: 'mc', title: '项目', ellipsis: true, width: 240 },
      // { dataIndex: 'yxq', title: '有效期' },
      { dataIndex: 'sl', title: '库存量', align: 'right' },
      { dataIndex: 'dw', title: '单位' }
    ],
    url: '/common/masterData/selectCKYPZKC',
    rowKey: 'bh',
    searchKey: 'zjm',
    params: {}
  },
  防疫患者: {
    desc: '选择防疫患者',
    columns: [
      { title: '姓名', dataIndex: 'brName', ellipsis: true, width: 120 },
      { title: '性别', dataIndex: 'brXb', width: 50 },
      { title: '年龄', dataIndex: 'brAge', width: 50, customRender: ({ text }) => (text === '0' ? '-' : text) },
      { title: '手机号', dataIndex: 'brMob', width: 110 }
    ],
    url: '/outp/mzdj/getPatientInfoList',
    rowKey: 'brId',
    labelKey: 'brName',
    searchKey: 'pyjm',
    params: {
      pageNum: 1,
      pageSize: 8,
      brId: '',
      brMob: '',
      brName: '',
      brSfz: ''
    }
  },
  用血申请患者: {
    desc: '选择用血申请患者',
    columns: [
      { title: '姓名', dataIndex: 'brName', width: 120, ellipsis: true },
      { title: '性别', dataIndex: 'brXb', width: 50 },
      { title: '年龄', dataIndex: 'brAge', width: 50, customRender: ({ text }) => (text === '0' ? '-' : text) },
      { title: '科室', dataIndex: 'deptName', width: 50 },
      { title: '病区', dataIndex: 'wardName', width: 50 }
    ],
    url: '/bloodm/BldTransfusionRecord/getBldPatientList',
    labelKey: '',
    searchKey: 'zjm',
    params: {
      zjm: ''
    }
  },
  血液申请单: {
    desc: '选择血液申请单',
    columns: [
      { title: '申请单号', dataIndex: 'appLsh' },
      { title: '情况描述', dataIndex: 'appDesc' }
    ],
    url: '/bloodm/bldApplicationRecord/getBldApplicationRecordList',
    labelKey: '',
    searchKey: 'appLsh',
    params: {
      appLsh: '',
      status: 1
    }
  },
  装备调入: {
    desc: '选择装备',
    columns: [
      { title: '设备序列号', dataIndex: 'bh' },
      { title: '装备名称', dataIndex: 'mc', width: 150 },
      { title: '规格', dataIndex: 'gg' },
      { title: '产地', dataIndex: 'cd' },
      { title: '创建时间', dataIndex: 'createTime' },
      { title: '助记码', dataIndex: 'zjm' }
    ],
    url: '/operation/opex/getItemDictionaryList',
    labelKey: '',
    searchKey: 'mcbh',
    params: {
      materialType: 3
    }
  },
  配置列表: {
    desc: '选择装备',
    columns: [
      { title: '设备序列号', dataIndex: 'equipmentNumber' },
      { title: '装备来源', dataIndex: 'sourceName' },
      { title: '启用日期', dataIndex: 'startDate' },
      { title: '配发科室', dataIndex: 'deptName' },
      { title: '使用人', dataIndex: 'userEmpName' },
      { title: '配置地点', dataIndex: 'configAddr' },
      { title: '使用年限', dataIndex: 'expectedLimit' }
    ],
    url: '/war/equipmentDistribution/getEquipmentConfigDictList',
    labelKey: '',
    searchKey: 'zjm',
    params: {
      equipmentName: ''
    }
  },
  装备配发: {
    desc: '选择装备',
    columns: [
      { title: '物品名称', dataIndex: 'equipmentName', ellipsis: true, width: 200 },
      { title: '助记码', dataIndex: 'zjm' },
      { title: '当前库存量', dataIndex: 'kcl' },
      { title: '单位', dataIndex: 'unit' },
      { title: '零售单价', dataIndex: 'dj' },
      { title: '生产日期', dataIndex: 'manufacturer' },
      { title: '注册证号', dataIndex: 'registrationNumber' },
      { title: '厂家', dataIndex: 'manufacturer' },
      { title: '产地', dataIndex: 'cd' },
      { title: '物品种类', dataIndex: 'xmlbName' },
      { title: '物品编号', dataIndex: 'bh' }
    ],
    url: '/war/equipmentDistribution/getEquipmentNameList',
    labelKey: '',
    searchKey: 'equipmentName',
    params: {
      equipmentName: ''
    }
  },
  挂号患者: {
    desc: '选择挂号患者',
    columns: [
      { title: '姓名', dataIndex: 'brName', ellipsis: true },
      { title: '性别', dataIndex: 'brXb' },
      { title: '年龄', dataIndex: 'brAge', width: 50, customRender: ({ text }) => (text === '0' ? '-' : text) },
      { title: '手机号', dataIndex: 'brMob' },
      { title: '人员属性', dataIndex: 'rysx' }
    ],
    url: '/outp/mzys/getOutpRecordInfoList',
    rowKey: 'brId',
    labelKey: '',
    searchKey: 'pyjm',
    params: {
      pyjm: '',
      type: 1
    }
  },
  对照项目: {
    desc: '选择对照项目',
    columns: [
      { title: '项目名称', dataIndex: 'mc' },
      { title: '项目类别', dataIndex: 'lbmc' },
      { title: '单价', dataIndex: 'dj' }
    ],
    url: '/lis/LisSfxmfzb/getOrderItemAndLisCategroyList',
    rowKey: 'bh',
    labelKey: '',
    searchKey: 'pyjm',
    params: {
      pyjm: ''
    }
  },
  医技对照项目: {
    desc: '选择对照项目',
    columns: [
      { title: '项目名称', dataIndex: 'mc' },
      { title: '项目类别', dataIndex: 'lbmc' },
      { title: '单价', dataIndex: 'dj' }
    ],
    url: '/ris/dictCategory/getRisSfxmbItemList',
    rowKey: 'bh',
    labelKey: '',
    searchKey: 'pyjm',
    params: {
      pyjm: ''
    }
  },
  质控规则: {
    desc: '选择质控规则',
    columns: [
      { title: '序号', dataIndex: 'outorder', width: 60 },
      { title: '名称', dataIndex: 'itemName' },
      { title: '备注', dataIndex: 'memo' }
    ],
    url: '/med/MedicalRecord/getMrItemList',
    rowKey: 'itemId',
    labelKey: '',
    searchKey: 'itemName',
    params: {
      itemName: '',
      qcFlag: 1
    }
  },
  输液管理: {
    desc: '选择输液管理',
    columns: registeredPatientsList,
    url: '/outp/mzhs/getOutpClinicalHzList',
    rowKey: 'jzbh',
    labelKey: '',
    searchKey: 'pyjm',
    params: {
      pyjm: ''
    }
  },
  护理医疗: {
    desc: '选择医生',
    columns: [
      { title: '编号', dataIndex: 'id' },
      { title: '名称', dataIndex: 'groupName' },
      { title: '备注', dataIndex: 'memo' }
    ],
    url: '/operation/opex/getEmpGroupEntityList',
    rowKey: 'empId',
    labelKey: 'empName',
    searchKey: 'pyjm',
    params: {
      pyjm: ''
    }
  },
  押金: {
    desc: '选择押金',
    columns: [
      { title: '押金单号', dataIndex: 'lsh' },
      { title: '押金金额', dataIndex: 'yjje' },
      { title: '收款时间', dataIndex: 'chargeTime' }
    ],
    url: '/outp/mzdj/getDepositSlipList',
    rowKey: 'lsh',
    searchKey: 'pyjm',
    params: {}
  },
  视光押金: {
    desc: '选择押金',
    columns: [
      { title: '押金单号', dataIndex: 'lsh' },
      { title: '押金金额', dataIndex: 'yjje' },
      { title: '收款时间', dataIndex: 'chargeTime' }
    ],
    url: '/outp/mzdj/getDepositSlipListSgXsd',
    rowKey: 'lsh',
    searchKey: 'pyjm',
    params: {}
  },
  检验移动: {
    desc: '选择药品',
    columns: movementDetails,
    url: '/common/masterData/selectWZYPYXQ',
    rowKey: 'bh',
    searchKey: 'zjm',
    params: {}
  },
  检验医生: {
    desc: '选择检验医生',
    columns: [
      { title: '医师姓名', dataIndex: 'empName' },
      { title: '性别', dataIndex: 'sex', width: 50 },
      { title: '科室', dataIndex: 'ksmc' },
      { title: '员工编号', dataIndex: 'empId' }
    ],
    url: '/outp/mzdj/getDocterInfoList',
    rowKey: 'empId',
    labelKey: 'empName',
    searchKey: 'zjm',
    params: {
      emplb: '1',
      ksdm: ''
    }
  },
  检验患者: {
    desc: '检验患者',
    columns: [
      { title: '姓名', dataIndex: 'brName', width: 100 },
      { title: '性别', dataIndex: 'brXb', width: 50 },
      { title: '年龄', dataIndex: 'brAge', width: 50, customRender: ({ text }) => (text === '0' ? '-' : text) },
      { title: '手机', dataIndex: 'brMob', width: 160 },
      { title: '地址', dataIndex: 'brJtdz', ellipsis: true }
    ],
    url: '/outp/mzdj/getOutpRecordInfoList',
    rowKey: 'brId',
    labelKey: 'brName',
    searchKey: 'pyjm',
    params: {
      pageNum: 1,
      pageSize: 8,
      ghzts: [0, 1]
    }
  },
  补记账: {
    desc: '补记账',
    columns: medicineColumns,
    url: '/operation/opex/getClinicalDictInfoList',
    rowKey: 'bh',
    labelKey: 'mc',
    searchKey: 'mcbh',
    params: {
      mcbh: '',
      pageNum: 1,
      pageSize: 8,
      yxzt: 0
    }
  },
  床位: {
    desc: '选择床位',
    columns: [
      { title: '床位', dataIndex: 'bedCode' },
      { title: '房间', dataIndex: 'roomName' },
      { title: '状态', dataIndex: 'statusStr' },
      { title: '性别', dataIndex: 'brXb' }
    ],
    url: '/operation/opex/getBedInfoList',
    rowKey: 'id',
    labelKey: 'bedCode',
    searchKey: 'pyjm',
    params: {
      pyjm: ''
    }
  },
  手术医生: {
    desc: '选择手术医生',
    columns: [
      { title: '姓名', dataIndex: 'empName' },
      { title: '性别', dataIndex: 'sex' },
      { title: '年龄', dataIndex: 'age' },
      { title: '手机号', dataIndex: 'phone' },
      { title: '科室', dataIndex: 'ksmc' },
      { title: '员工编号', dataIndex: 'empId' },
      { title: '职称', dataIndex: 'title' }
    ],
    url: '/outp/mzdj/getSchedulingDocterList',
    rowKey: 'empId',
    labelKey: 'empName',
    searchKey: 'zjm',
    params: {
      emplb: '1',
      ksdm: ''
    }
  },
  手术: {
    desc: '选择手术',
    columns: [
      { title: '手术操作代码', dataIndex: 'ssdm', width: 100, ellipsis: true },
      { title: '手术操作名称', dataIndex: 'mc', ellipsis: true }
    ],
    url: '/common/masterData/getCanUseDrugList',
    rowKey: 'bh',
    searchKey: 'zjm',
    params: {
      xmlbList: [6]
    }
  },
  手术icd9: {
    desc: '选择手术',
    columns: [
      { title: '手术操作代码', dataIndex: 'icd9Code', width: 100, ellipsis: true },
      { title: '手术操作名称', dataIndex: 'icd9Name', ellipsis: true },
      { title: '国家医保编码', dataIndex: 'nmiCode', ellipsis: true },
      { title: '国家医保名称', dataIndex: 'nmiYptym', ellipsis: true }
    ],
    url: '/common/masterData/getDictICD9List',
    rowKey: 'icd9Code',
    searchKey: 'zjm',
    params: {
      zjm: ''
    }
  },
  // 门诊处置手术项目: {
  //   desc: '选择门诊处置手术项目',
  //   columns: [
  //     { title: '代码', dataIndex: 'sfxmbh', width: 150, ellipsis: true },
  //     { title: '项目', dataIndex: 'mc', ellipsis: true },
  //     { title: '助记码', dataIndex: 'pyjm' }
  //   ],
  //   url: '/outp/mzys/getPatientTreatmentInfoList',
  //   rowKey: 'bh',
  //   searchKey: 'zjm',
  //   params: {
  //     xmlb: [6],
  //     czsfck: 0
  //   }
  // },
  手术收费项目: {
    desc: '选择手术',
    columns: [
      { title: '代码', dataIndex: 'bh', width: 100, ellipsis: true },
      { title: '项目', dataIndex: 'mc', ellipsis: true },
      { title: '助记码', dataIndex: 'pyjm', width: 180, ellipsis: true }
    ],
    url: '/common/masterData/getCanUseDrugList',
    rowKey: 'bh',
    searchKey: 'zjm',
    params: {
      xmlbList: [6]
    }
  },
  转诊医生: {
    desc: '选择转诊医生',
    columns: [
      { title: '姓名', dataIndex: 'empName' },
      { title: '性别', dataIndex: 'sex' },
      { title: '年龄', dataIndex: 'age' },
      { title: '手机号', dataIndex: 'phone', width: 120 },
      { title: '科室', dataIndex: 'ksmc' },
      { title: '员工编号', dataIndex: 'empId' },
      { title: '职称', dataIndex: 'title' }
    ],
    url: '/outp/mzdj/getSchedulingDocterList',
    rowKey: 'empId',
    labelKey: 'empName',
    searchKey: 'zjm',
    params: {
      ksdm: ''
    }
  },
  诊室: {
    desc: '选择诊室',
    columns: roomcolumns,
    url: '/operation/opex/getRoomList',
    rowKey: 'id',
    searchKey: 'pyjm',
    params: {
      pageNum: 1,
      pageSize: 10
    }
  },
  班制: {
    desc: '选择班制',
    columns: shiftscolumns,
    url: '/operation/scheduling/getSchedulingList',
    rowKey: 'id',
    searchKey: 'pyjm',
    params: {
      pageNum: 1,
      pageSize: 10
    }
  },
  暂无班制: {
    desc: '选择暂无班制',
    columns: shiftscolumns,
    url: '/operation/scheduling/getSchedulingListNotYet',
    rowKey: 'id',
    searchKey: 'pyjm',
    params: {
      pageNum: 1,
      pageSize: 10
    }
  },
  护士排班: {
    desc: '选择暂无班制',
    columns: shiftscolumns,
    url: '/operation/scheduling/getSchedulingListNotYet',
    rowKey: 'id',
    searchKey: 'pyjm',
    params: {
      type: '1',
      pageNum: 1,
      pageSize: 10
    }
  },
  员工: {
    desc: '选择员工',
    columns: empcolumns,
    url: '/operation/opex/getEmpInfoList',
    rowKey: 'id',
    searchKey: 'mcbm',
    params: {
      yxzt: 0,
      pageNum: 1,
      pageSize: 10
    }
  },
  理疗预约: {
    desc: '选择客户',
    columns: appointmentUser,
    url: '/course/serviceItemAssociation/getCourseAppointmentList',
    rowKey: 'lsh',
    searchKey: 'brName',
    params: {
      status: 0,
      pageNum: 1,
      pageSize: 10
    }
  },
  预约医师: {
    desc: '选择医师',
    columns: appointmentDoctor,
    url: '/course/serviceItemAssociation/getEmpList',
    rowKey: 'empId',
    searchKey: 'pyjm',
    params: {
      pageNum: 1,
      pageSize: 10
    }
  },
  理疗非预约: {
    desc: '选择客户',
    columns: physiotherapyBooking,
    url: '/course/serviceItemAssociation/getPatientList',
    rowKey: 'brId',
    searchKey: 'pyjm',
    params: {
      status: 2,
      pageNum: 1,
      pageSize: 10
    }
  },

  服务: {
    desc: '选择服务',
    columns: serve,
    url: '/course/courseServiceItem/getServiceItemList',
    rowKey: 'itemCode',
    searchKey: 'zjm',
    params: {
      status: 0
    }
  },
  物资采购: {
    desc: '选择物资',
    columns: supplyDetails,
    url: '/common/masterData/physicianMtrSFXMB',
    rowKey: 'bh',
    searchKey: 'zjm',
    params: {}
  },
  视光仓储物资采购: {
    desc: '选择物资',
    columns: supplyDetails,
    url: '/common/masterData/physicianOOSSFXMB',
    rowKey: 'bh',
    searchKey: 'zjm',
    params: {}
  },
  视光仓储物资: {
    desc: '选择物资',
    columns: supplyDetails,
    url: '/common/masterData/selectOOSYPYXQ',
    rowKey: 'bh',
    searchKey: 'zjm',
    params: {}
  },
  采购: {
    desc: '选择药品',
    columns: supplyDetails,
    url: '/common/masterData/physicianSFXMB',
    rowKey: 'bh',
    searchKey: 'zjm',
    params: {}
  },
  移动: {
    desc: '选择药品',
    columns: movementDetails,
    url: '/common/masterData/selectCKYPYXQ',
    rowKey: 'bh',
    searchKey: 'zjm',
    params: {}
  },

  药品: {
    desc: '选择药品',
    columns: medicineColumns,
    url: '/common/masterData/getClinicalOrderInfoList',
    rowKey: 'bh',
    labelKey: 'mc',
    searchKey: 'zjm',
    params: {}
  },
  中药: {
    desc: '选择中药',
    columns: TCMmedicineColumns,
    url: '/common/masterData/physicianOrderItemAcquisition',
    rowKey: 'bh',
    searchKey: 'zjm',
    params: {
      xmlbList: [5]
    }
  },
  茗视光患者: {
    desc: '选择茗视光患者',
    columns: [
      { title: '首诊院区', dataIndex: 'firstConsultationHospital', width: 100 },
      { title: '姓名', dataIndex: 'brName', ellipsis: true, width: 100 },
      { title: '性别', dataIndex: 'brXb', width: 50 },
      { title: '年龄', dataIndex: 'brAge', width: 50, customRender: ({ text }) => (text === '0' ? '-' : text) },
      { title: '手机号', dataIndex: 'brMob', width: 110 },
      // { title: '手术病案号', dataIndex: 'oprSn', width: 120 },
      { title: '身份证号', dataIndex: 'brSfz', width: 160 },
      { title: '首诊日期', dataIndex: 'brSzsjNyr', width: 90 },
      { title: '病案号', dataIndex: 'brBlkh', width: 100 }
    ],
    url: '/outp/mzdj/getPatientInfoList',
    rowKey: 'brId',
    labelKey: 'brName',
    searchKey: 'pyjm',
    params: {
      pageNum: 1,
      pageSize: 8,
      brId: '',
      brMob: '',
      brName: '',
      brSfz: ''
    }
  },
  患者: {
    desc: '选择患者',
    columns: [
      { title: '姓名', dataIndex: 'brName', ellipsis: true },
      { title: '性别', dataIndex: 'brXb', width: 50 },
      { title: '年龄', dataIndex: 'brAge', width: 50, customRender: ({ text }) => (text === '0' ? '-' : text) },
      { title: '手机号', dataIndex: 'brMob', width: 110 },
      // { title: '手术病案号', dataIndex: 'oprSn', width: 120 },
      { title: '身份证号', dataIndex: 'brSfz', width: 160 },
      { title: '出生日期', dataIndex: 'brBtd', width: 100 }
    ],
    url: '/outp/mzdj/getPatientInfoList',
    rowKey: 'brId',
    labelKey: 'brName',
    searchKey: 'pyjm',
    params: {
      pageNum: 1,
      pageSize: 8,
      brId: '',
      brMob: '',
      brName: '',
      brSfz: ''
    }
  },
  押金患者: {
    desc: '选择押金患者',
    columns: [
      { title: '姓名', dataIndex: 'brName' },
      { title: '性别', dataIndex: 'brXb', width: 50 },
      { title: '年龄', dataIndex: 'brAge', width: 50, customRender: ({ text }) => (text === '0' ? '-' : text) },
      { title: '手机号', dataIndex: 'brMob', width: 150 },
      { title: '卡号', dataIndex: 'brId' }
    ],
    url: '/outp/mzdj/getPatientInfoList',
    rowKey: 'brId',
    labelKey: 'brName',
    searchKey: 'pyjm',
    params: {
      pageNum: 1,
      pageSize: 8,
      brId: '',
      brMob: '',
      brName: '',
      brSfz: ''
    }
  },
  茗视光预约患者: {
    desc: '选择茗视光预约患者',
    columns: [
      { title: '姓名', dataIndex: 'brName', width: 100 },
      { title: '预约日期', dataIndex: 'yyrq', width: 90 },
      { title: '预约时间', dataIndex: 'yytime', width: 90 },
      { title: '手机号', dataIndex: 'brMob', width: 110 },
      { title: '挂号类别', dataIndex: 'ghlb', width: 90 },
      { title: '预约医生', dataIndex: 'ysName', width: 90 },
      { title: '业务员', dataIndex: 'brYwyName', width: 90 },
      { title: '首诊院区', dataIndex: 'firstConsultationHospital', width: 100 },
      { title: '首诊日期', dataIndex: 'brSzsjNyr', width: 100 },
      { title: '病案号', dataIndex: 'brBlkh', width: 100 }
    ],
    url: '/outp/mzdj/getBookingList',
    rowKey: 'brId',
    labelKey: 'brName',
    searchKey: 'pyjm',
    params: {
      pyjm: '',
      yyrq: '',
      yytime: '',
      yyys: '',
      yyzt: 0,
      stdate: '',
      eddate: ''
    }
  },
  预约患者: {
    desc: '选择预约患者',
    columns: reservationColumns,
    url: '/outp/mzdj/getBookingList',
    rowKey: 'brId',
    labelKey: 'brName',
    searchKey: 'pyjm',
    params: {
      pyjm: '',
      yyrq: '',
      yytime: '',
      yyys: '',
      yyzt: 0,
      stdate: '',
      eddate: ''
    }
  },
  诊断: {
    desc: '选择诊断',
    columns: diagnosisColumnsList,
    url: '/operation/opex/getCD10InfoList',
    rowKey: 'zddm',
    labelKey: 'zdmc',
    searchKey: 'pyjm',
    params: {
      pageNum: 1,
      pageSize: 8,
      status: 0
    }
  },
  病种: {
    desc: '选择病种',
    columns: [
      { title: '病种代码', dataIndex: 'zddm', ellipsis: true },
      { title: '病种名称', dataIndex: 'zdmc', ellipsis: true }
    ],
    url: '/operation/opex/getCD10InfoList',
    rowKey: 'zddm',
    labelKey: 'zdmc',
    searchKey: 'pyjm',
    params: {
      pageNum: 1,
      pageSize: 8,
      status: 0
    }
  },
  军医处置: {
    desc: '选择处置',
    columns: militaryColumns,
    url: '/common/masterData/getClinicalOrderInfoList',
    rowKey: 'bh',
    searchKey: 'zjm',
    params: {
      // yzlx: 3
      cxlx: '1',
      yjlb: [0, 3]
    }
  },
  处置: {
    desc: '选择处置',
    columns: disposeColumns,
    url: '/common/masterData/getClinicalOrderInfoList',
    rowKey: 'bh',
    searchKey: 'zjm',
    params: {
      // yzlx: 3
      cxlx: '1',
      yjlb: [0, 3]
    }
  },
  处置类型: {
    desc: '选择处置',
    columns: disposeColumns,
    url: '/common/masterData/getClinicalOrderInfoList',
    rowKey: 'bh',
    searchKey: 'zjm',
    params: {
      // yzlx: 3
      cxlx: '1'
      // yjlb: [0, 3]
    }
  },
  处方: {
    desc: '选择处方',
    columns: medicineColumns,
    url: '/common/masterData/getCanUseDrugList',
    rowKey: 'bh',
    searchKey: 'zjm',
    params: {
      xmlbList: [2, 4]
    }
  },
  电子病历下拉列表: {
    desc: '选择电子病历下拉列表',
    columns: [
      { title: '名称', dataIndex: 'dictName', ellipsis: true },
      { title: '描述', dataIndex: 'memo', ellipsis: true },
      { title: '助记码', dataIndex: 'zjm', ellipsis: true },
      { title: '编号', dataIndex: 'dictCode', ellipsis: true }
    ],
    searchKey: 'zjm',
    params: {},
    url: '/emr/emrTemplateDict/getEmrTemplateDict'
  },
  门诊医嘱项目: {
    desc: '选择门诊医嘱项目',
    columns: disposeColumns,
    url: '/common/masterData/physicianOrderItemAcquisition',
    rowKey: 'bh',
    searchKey: 'zjm',
    params: {}
  },
  物品: {
    desc: '选择物品',
    columns: articleColumns,
    url: '',
    rowKey: '',
    searchKey: '',
    params: {}
  },
  手术预约: {
    desc: '选择手术预约患者',
    columns: [
      { title: '姓名', dataIndex: 'brName' },
      { title: '性别', dataIndex: 'brXb', width: 50 },
      { title: '年龄', dataIndex: 'brAge', width: 50, customRender: ({ text }) => (text === '0' ? '-' : text) },
      { title: '手机号', dataIndex: 'brMob', width: 150 },
      { title: '卡号', dataIndex: 'brId' },
      { title: '预约手术日期', dataIndex: 'oprDate', width: 150 }
    ],
    url: '/operation/opex/getAppointmentRecordList',
    rowKey: 'aptmLsh',
    labelKey: 'brName',
    searchKey: 'zjm',
    params: {
      pageNum: 1,
      pageSize: 8,
      status: 0
    }
  },
  护士: {
    desc: '选择护士',
    columns: [
      { title: '姓名', dataIndex: 'empName' },
      { title: '性别', dataIndex: 'sex', width: 50 },
      { title: '年龄', dataIndex: 'brAge', width: 50, customRender: ({ text }) => (text === '0' ? '-' : text) },
      { title: '手机号', dataIndex: 'phone', width: 120 },
      { title: '科室', dataIndex: 'ksmc' },
      { title: '员工编号', dataIndex: 'empId' },
      { title: '职称', dataIndex: 'title' }
    ],
    url: '/outp/mzdj/getDocterInfoList',
    rowKey: 'empId',
    labelKey: 'empName',
    searchKey: 'zjm',
    params: {
      emplb: '2',
      ksdm: ''
    }
  },
  医生: {
    desc: '选择医生',
    columns: [
      { title: '姓名', dataIndex: 'empName' },
      { title: '性别', dataIndex: 'sex', width: 50 },
      { title: '年龄', dataIndex: 'age', width: 50 },
      { title: '手机号', dataIndex: 'phone' },
      { title: '科室', dataIndex: 'ksmc' },
      { title: '员工编号', dataIndex: 'empId' },
      { title: '职称', dataIndex: 'title' }
    ],
    url: '/outp/mzdj/getDocterInfoList',
    rowKey: 'empId',
    labelKey: 'empName',
    searchKey: 'zjm',
    params: {
      emplb: '1',
      ksdm: ''
    }
  },
  视光医生: {
    desc: '选择视光医生',
    columns: [
      { title: '姓名', dataIndex: 'empName', ellipsis: true },
      { title: '性别', dataIndex: 'sex', width: 50 },
      { title: '年龄', dataIndex: 'age', width: 50 },
      { title: '手机号', dataIndex: 'phone' },
      { title: '科室', dataIndex: 'ksmc' },
      { title: '员工编号', dataIndex: 'empId' },
      { title: '职称', dataIndex: 'title' }
    ],
    url: '/common/emp/getSystemOrganizationEmp',
    rowKey: 'empId',
    labelKey: 'empName',
    searchKey: 'pyjm',
    params: {
      emplbid: '1'
    }
  },
  班制医生: {
    desc: '选择班制医生',
    columns: [
      { title: '姓名', dataIndex: 'empName' },
      { title: '性别', dataIndex: 'sex' },
      { title: '年龄', dataIndex: 'age' },
      { title: '手机号', dataIndex: 'phone' },
      { title: '科室', dataIndex: 'ksmc' },
      { title: '员工编号', dataIndex: 'empId' },
      { title: '职称', dataIndex: 'title' }
    ],
    url: '/outp/mzdj/getSchedulingDocterList',
    rowKey: 'empId',
    labelKey: 'empName',
    searchKey: 'zjm',
    params: {
      ksdm: ''
    }
  },
  职责医生: {
    desc: '选择职责医生',
    columns: [
      { title: '工号', dataIndex: 'empId' },
      { title: '姓名', dataIndex: 'empName' }
    ],
    url: '/drugStorage/comprehenive/getResponsibleDoctor',
    rowKey: 'empId',
    labelKey: 'empName',
    searchKey: '',
    params: {}
  },
  职责护士: {
    desc: '选择职责护士',
    columns: [
      { title: '工号', dataIndex: 'empId' },
      { title: '姓名', dataIndex: 'empName' }
    ],
    url: '/drugStorage/comprehenive/getResponsibleNurse',
    rowKey: 'empId',
    labelKey: 'empName',
    searchKey: 'pyjm',
    params: {}
  },
  用法: {
    desc: '选择频率',
    columns: [
      { title: '给药途径名称', dataIndex: 'fyff', ellipsis: true },
      { title: '助记码', dataIndex: 'zjm' }
    ],
    rowKey: 'fyffid',
    searchKey: 'zjm',
    params: {},
    labelKey: 'fyff',
    url: '/common/masterData/getDrugUsageInfoList'
  },
  频率: {
    desc: '选择频次',
    columns: [
      { title: '频次名称', dataIndex: 'pl', ellipsis: true },
      { title: '助记码', dataIndex: 'zjm' }
    ],
    rowKey: 'plid',
    labelKey: 'pl',
    searchKey: 'zjm',
    params: {},
    url: '/common/masterData/getFrequencyInfoList'
  },

  条形码: {
    desc: '选择条形码',
    columns: barCodeColumns,
    rowKey: '',
    labelKey: '',
    searchKey: '',
    params: {},
    url: ''
  },
  挂号费别: {
    desc: '选择挂号费别',
    columns: registrationFees,
    rowKey: 'bh',
    labelKey: 'dj',
    searchKey: 'zjm',
    params: {
      zjm: ''
    },
    url: '/operation/opex/getRegistrationFees'
  },
  检验项目: {
    desc: '选择检验项目',
    columns: inspectionItemsColumns,
    searchKey: 'pyjm',
    rowKey: 'id',
    params: {},
    url: '/lis/InstrumentType/getLisDictItemList'
  },
  关联项目: {
    desc: '选择关联项目',
    columns: registrationFees,
    rowKey: 'bh',
    labelKey: 'dj',
    searchKey: 'mcbh',
    params: {
      xmlb: ['其他费用'],
      yxzt: 0
    },
    url: '/operation/opex/getClinicalDictInfoList'
  },
  诊疗费别: {
    desc: '选择诊疗费别',
    columns: registrationFees,
    rowKey: 'bh',
    labelKey: 'dj',
    searchKey: 'zjm',
    params: {
      zjm: ''
    },
    url: '/operation/opex/getDiagnosisFees'
  },
  普通加预约患者: {
    columns: [
      { title: '姓名', dataIndex: 'brName', ellipsis: true },
      { title: '性别', dataIndex: 'brXb', width: 50 },
      { title: '年龄', dataIndex: 'brAge', width: 50, customRender: ({ text }) => (text === '0' ? '-' : text) },
      { title: '手机号', dataIndex: 'brMob' },
      { title: '预约时间', dataIndex: 'yysj', width: 120 },
      { title: '预约医生', dataIndex: 'yyysName' },
      { title: '业务员', dataIndex: 'ywy' }
    ],

    rowKey: 'brId',
    labelKey: 'brName',
    searchKey: 'pyjm',
    params: {},
    url: '/common/patient/getPatientInfoBookingList'
  },
  已收费患者列表: {
    columns: [
      { title: '姓名', dataIndex: 'brName' },
      { title: '性别', dataIndex: 'brXb', width: 50 },
      { title: '年龄', dataIndex: 'brAge', width: 60, customRender: ({ text }) => (text === '0' ? '-' : text) },
      { title: '科室', dataIndex: 'ksmc' },
      { title: '医生', dataIndex: 'empName' },
      { title: '挂号时间', dataIndex: 'ghsj', width: 160 }
    ],
    rowKey: 'jzbh',
    labelKey: '',
    searchKey: 'pyjm',
    params: {
      xmlbs: [2, 4, 5]
    },
    url: '/outp/mzyf/getExecuteClinicalOrderInfoList'
  },
  门诊挂号患者列表: {
    columns: registeredPatientsList,
    rowKey: 'jzbh',
    labelKey: '',
    searchKey: 'pyjm',
    params: {
      pyjm: ''
    },
    url: '/outp/mzdj/getOutpRecordInfoListMZSF'
  },
  门诊退药患者列表: {
    columns: registeredPatientsListRefund,
    rowKey: 'jzbh',
    labelKey: '',
    searchKey: 'pyjm',
    params: {
      xmlbs: [2, 4, 5],
      pyjm: ''
    },
    url: '/outp/mzyf/getExecuteClinicalOrderInfoList'
  },
  门诊挂号患者列表退费: {
    columns: registeredPatientsRefund,
    rowKey: 'brId',
    labelKey: '',
    searchKey: 'zjm',
    params: {
      zjm: ''
    },
    url: '/outp/oupCharge/getOutpRefundPatientList'
  },
  供应商: {
    desc: '选择供应商',
    columns: [
      { title: '供应商名称', dataIndex: 'gysmc' },
      { title: '联系人', dataIndex: 'lxr' },
      { title: '联系电话', dataIndex: 'lxdh' }
    ],
    rowKey: 'gysbh',
    labelKey: 'gysmc',
    searchKey: 'zjm',
    params: {
      zjm: ''
    },
    url: '/drugStorage/comprehenive/getSupplierInfoList'
  },
  物资供应商: {
    desc: '选择物资供应商',
    columns: [
      { title: '供应商名称', dataIndex: 'gysmc' },
      { title: '联系人', dataIndex: 'lxr' },
      { title: '联系电话', dataIndex: 'lxdh' }
    ],
    rowKey: 'gysbh',
    labelKey: 'gysmc',
    searchKey: 'zjm',
    params: {
      zjm: ''
    },
    url: '/materials/comprehenive/getSupplierInfoList'
  },
  视光供应商: {
    desc: '选择视光供应商',
    columns: [
      { title: '供应商名称', dataIndex: 'supplierName' },
      { title: '联系人', dataIndex: 'contactPerson' },
      { title: '联系电话', dataIndex: 'contactPhone' }
    ],
    rowKey: 'id',
    labelKey: 'supplierName',
    searchKey: 'zjm',
    params: {
      zjm: ''
    },
    url: '/optometry/ooadolescentcheck/getSupplierInfoList'
  },
  视光仓库供应商: {
    desc: '选择视光供应商',
    columns: [
      { title: '供应商名称', dataIndex: 'gysmc' },
      { title: '联系人', dataIndex: 'lxr' },
      { title: '联系电话', dataIndex: 'contactPhone' }
    ],
    rowKey: 'id',
    labelKey: 'supplierName',
    searchKey: 'zjm',
    params: {
      zjm: ''
    },
    url: '/oos/comprehenive/getSupplierInfoList'
  },
  中医诊断: {
    desc: '选择中医诊断',
    columns: diagnosisColumns,
    url: '/common/masterData/getICD10TCMList',
    rowKey: 'id',
    labelKey: 'mc',
    searchKey: 'zjm',
    params: {
      pageSize: 8,
      pageNum: 1
    }
  },
  术前诊断: {
    desc: '选择中医诊断',
    columns: [
      { title: '诊断名称', dataIndex: 'zdmc' },
      { title: '诊断代码', dataIndex: 'zddm' },
      { title: '助记码', dataIndex: 'zjm' },
      { title: '备注', dataIndex: 'memo' }
    ],
    url: '/operation/opex/getCD10InfoList',
    rowKey: 'id',
    labelKey: 'mc',
    searchKey: 'pyjm',
    params: {
      pageSize: 8,
      pageNum: 1,
      status: 0
    }
  },
  中医证名: {
    desc: '选择中医证名',
    columns: diagnosisColumns,
    url: '/common/masterData/getSyndromeTCMList',
    rowKey: 'id',
    labelKey: 'mc',
    searchKey: 'zjm',
    params: {
      pageSize: 8,
      pageNum: 1
    }
  },

  收费标准: {
    desc: '选择收费标准',
    columns: medicineColumns,
    url: '/common/masterData/physicianOrderItemAcquisition',
    rowKey: 'bh',
    searchKey: 'zjm',
    params: {}
  },
  入院登记: {
    desc: '选择患者名称',
    columns: inRegistration,
    // url: '/inp/zydj/getInpAppointmentRecordList',
    url: '/inp/zydj/getPatientInpAppointmentRecordList',
    rowKey: 'id',
    searchKey: 'pyjm',
    params: {}
  },
  住院结算待结算患者列表: {
    desc: '选择患者名称',
    columns: inSettlement,
    url: '/inp/inpComprehensive/getUnpaidPatientList',
    rowKey: 'brId',
    searchKey: 'pyjm',
    params: {}
  },
  押金检索收取押金: {
    desc: '选择患者名称',
    columns: chargeCollect,
    url: '/inp/zydj/getInpRecordList',
    rowKey: 'brId',
    searchKey: 'pyjm',
    params: {
      pageSize: 8,
      pageNum: 1
    }
  },
  视光商品镜架: {
    desc: '选择商品',
    columns: optometryComFrame,
    url: '/optometry/ooadolescentcheck/getDictOoProductSku',
    rowKey: 'skuid',
    searchKey: 'zjm',
    params: {}
  },
  视光商品镜片: {
    desc: '选择商品',
    columns: optometryComLens,
    url: '/optometry/ooadolescentcheck/getDictOoProductSku',
    rowKey: 'skuid',
    searchKey: 'zjm',
    params: {}
  },
  视光商品其它: {
    desc: '选择商品',
    columns: optometryComOther,
    url: '/optometry/ooadolescentcheck/getDictOoProductSku',
    rowKey: 'skuid',
    searchKey: 'zjm',
    params: {}
  },
  视光挂号患者列表: {
    columns: registeredPatientsList,
    rowKey: 'jzbh',
    labelKey: '',
    searchKey: 'pyjm',
    params: {
      pyjm: ''
    },
    url: '/outp/mzdj/getOutpRecordInfoSgList'
  },
  视光挂号患者列表退费: {
    columns: registeredPatientsListRefund,
    rowKey: 'brId',
    labelKey: '',
    searchKey: 'zjm',
    params: {
      zjm: ''
    },
    url: '/outp/oupCharge/getOutpRefundPatientListSg'
  },
  已完成医保对照医生: {
    desc: '选择医生',
    columns: [
      { title: '姓名', dataIndex: 'empName' },
      { title: '性别', dataIndex: 'sex', width: 50 },
      { title: '手机号', dataIndex: 'phone' },
      { title: '科室', dataIndex: 'ksmc' },
      { title: '员工编号', dataIndex: 'empId' }
    ],
    url: '/insure/getEmpInsure',
    rowKey: 'empId',
    labelKey: 'empName',
    searchKey: 'bh',
    params: {}
  },
  住院登记退费人员: {
    columns: inDischargeRefund,
    rowKey: 'brId',
    labelKey: '',
    searchKey: 'pyjm',
    params: {
      pyjm: ''
    },
    url: '/inp/inpComprehensive/getRefundSearch'
  },
  后送计划: {
    columns: evacuationPlan,
    rowKey: 'id',
    labelKey: '',
    searchKey: 'planName',
    params: {
      planName: ''
    },
    url: '/war/warEvacuationPlan/getWarEvacuationPlanList'
  }
}
export function getSelectTableConfig(type) {
  const current = cloneDeep(config[type])
  //发药扣减库存
  if (getSystemConfig('ENABLE_DISPENSING_INVENTORY_DEDUCTION') === '0') {
    current.columns = current.columns.filter((item) => item.title !== '库存量')
  }
  //军用
  if (getSystemConfig('NAVYHIS_MODE') === '1') {
    current.columns = current.columns.filter((item) => item.dataIndex !== 'dj')
  }
  current.columns = current.columns.map((item) => ({
    ...item,
    resizable: true
  }))
  return current
}
